package com.bwie.test;

/**
 * description:
 *
 * @Author caoshuaifeng
 * @Create 2025/4/25 19:36
 * @Version 1.0
 */
public class ThreadDemo {
    public static void main(String[] args) {
        /**
         * 定义一个类继承Thread
         * 重写run方法
         * 创建对象，调用start方法
         */
        MyThread myThread1 = new MyThread();
        MyThread myThread2 = new MyThread();
        MyThread myThread3 = new MyThread();

        myThread1.setName("线程1");
        myThread2.setName("线程2");
        myThread3.setName("线程3");

        myThread1.start();
        myThread2.start();
        myThread3.start();
    }

}
